package com.k.kpp.web.controller;

public class Curl {
    public static void main(String[] args) {
        // 下载模板
        // @RequestMapping(value = "download", method = RequestMethod.GET)
        // Controller public ResponseEntity downloadTemplate(@RequestParam(value = "downloadType") String downloadType, HttpServletResponse response){}
        // curl -X GET -H  "Accept:*/*" -H  "Content-Type:application/x-www-form-urlencoded" "http://10.110.12.159:9000/base-data/excel/download?downloadType=import_function" --output f-tp..xlsx

        // 下载数据
        //  @RequestMapping(value = "/function/export", method = RequestMethod.GET)
        //  public ResponseEntity exportPatrolStatisticsData(HttpServletResponse res) {}
        //  curl -X GET -H  "Accept:*/*" -H  "Content-Type:application/x-www-form-urlencoded" "http://localhost:9000/base-data/excel/function/export" --output f-data.xlsx

        // 上传文件并导入
        // @RequestMapping(value = "/import1", method = RequestMethod.POST)
        // Controller:public Result<String> uploadAndImport1(MultipartFile file,ImportDataDTO vo){}
        // curl -X POST -H  "Accept:*/*" -H  "Content-Type:multipart/form-data" -F  "excelTaskType=1" -F  "fileId=1" -F  "orgCode=1" -F  "file=@f-data.xlsx" "http://localhost:9000/base-data/excel/import1"

        // POST JSON HEADER
        // curl -X POST -H  "Accept:application/json" -H  "Content-Type:application/json" -H "Accept-Language: zh-CN" -H "X-User-Info: {\"userId\":\"0000000000000000000000000000001\",\"userName\":\"admin\",\"userType\":\"1\",\"orgCode\":\"450200000000\",\"orgId\":\"bdb81aa6-3960-48f6-94d8-ac34a535f970\"}" -d "{\"districtName\":\"\",\"enableFlag\":\"\",\"guid\":\"\",\"lockStatus\":\"\",\"orgGovCode\":\"\",\"orgGuid\":\"\",\"orgName\":\"\",\"sort\":0,\"staffGuid\":\"\",\"staffName\":\"\",\"userIcon\":\"\",\"userName\":\"\",\"userPassword\":\"\",\"userType\":\"\"}" "http://localhost:9000/test/curlPostJson"

    }
}
